package com.itheima.mapper;

import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

    //查询
    //@Select("select * from user where username = ?;")
    User findByUsername(@Param("username") String username);

    Boolean insertUser(User user);

    Boolean updateByUserId(User user);

    Boolean updateByUsername(User user);

    //插入
    //@Insert("insert into user(username, password, create_time, update_time) values(#{},#{},#{},#{},#{});")
    //void register(String username, String password);
}
